<template>
  <div class="body">
    <el-row v-if="!hasData" class="no-data">
      <div align="right">
        <el-button type="primary" @click="add">新增</el-button>
      </div>
      <h3 align="center">无数据</h3>
    </el-row>
    <el-row v-if="hasData">
      <el-row class="title" style="margin: 0px 25px 0px 15px" type="flex">
        <el-col :sm="24" align="right">
          <el-button type="primary" @click="save">保存</el-button>
        </el-col>
      </el-row>
      <el-form
        ref="outcome"
        :model="outcomeForm"
        :rules="outcomeRules"
        label-position="left"
        label-width="100px"
        class="box-outCome"
      >
        <el-row type="flex">
          <el-form-item label="活动名称：">
            <el-radio-group v-model="outcomeForm.outcomeCode">
              <el-radio
                v-for="(outcomeItem, outcomeIndex) in outcomeList"
                :key="'outcome' + outcomeIndex"
                :label="outcomeItem.outcomeCode"
              >
                {{ outcomeItem.outcomeName }}
              </el-radio>
            </el-radio-group>
          </el-form-item>
        </el-row>
        <el-row v-if="outcomeForm.outcomeCode" type="flex">
          <div class="inner">
            <!-- 出院 -->
            <el-form-item v-if="outcomeForm.outcomeCode != '5'" label="出院诊断：">
              <el-select v-model="outcomeForm.mainDiagnosisCode">
                <el-option
                  v-for="(
                    mainDiagnosisItem, mainDiagnosisIndex
                  ) in mainDiagnosisList"
                  :key="'mainDiagnosis' + mainDiagnosisIndex"
                  :label="mainDiagnosisItem.mainDiagnosisName"
                  :value="mainDiagnosisItem.mainDiagnosisCode"
                />
              </el-select>
            </el-form-item>
            <!-- 离院 -->
            <el-form-item v-if="outcomeForm.outcomeCode == '5'" label="出院诊断：">
              <el-select v-model="outcomeForm.firstDiagnosisCode">
                <el-option
                  v-for="(
                    firstDiagnosisItem, firstDiagnosisIndex
                  ) in firstDiagnosisList"
                  :key="'firstDiagnosis' + firstDiagnosisIndex"
                  :label="firstDiagnosisItem.firstDiagnosisName"
                  :value="firstDiagnosisItem.firstDiagnosisCode"
                />
              </el-select>
            </el-form-item>
          </div>
          <!-- 离院 -->
          <div v-if="outcomeForm.outcomeCode === '5'">
            <el-form-item label="确诊时间：" class="date">
              <el-date-picker
                v-model="outcomeForm.firstDiagnosisTime"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
              />
            </el-form-item>
          </div>
          <!-- 出院 -->
          <div v-if="outcomeForm.outcomeCode !== '5'">
            <el-form-item label="确诊时间：" class="date">
              <el-date-picker v-model="outcomeForm.diagnosisTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" />
            </el-form-item>
          </div>
          <div v-if="outcomeForm.outcomeCode !== '5'" class="inner">
            <el-form-item label="COVID-19：">
              <el-select v-model="outcomeForm.covid19">
                <el-option
                  v-for="(covidItem, covidIndex) in covidList"
                  :key="'covid' + covidIndex"
                  :label="covidItem.covidName"
                  :value="covidItem.covidCode"
                />
              </el-select>
            </el-form-item>
          </div>
        </el-row>
        <el-row
          v-if="outcomeForm.outcomeCode !== '5' &&
            (outcomeForm.mainDiagnosisCode === '1' ||
            outcomeForm.mainDiagnosisCode === '2' ||
            outcomeForm.mainDiagnosisCode === '3')
          "
        >
          <el-row type="flex">
            <div class="inner_indent out_indent judge">
              <el-form-item label="院内新发心力衰竭：" prop="isHeartFailure" label-width="150px">
                <el-radio-group v-model="outcomeForm.isHeartFailure">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="心功能分级：" prop="heartFailuerNyhaLevel" label-width="115px">
                <el-radio-group
                  v-model="outcomeForm.heartFailuerNyhaLevel"
                  :disabled="outcomeForm.isHeartFailure !== '1'"
                >
                  <el-radio
                    v-for="(nyhaItem, nyhaIndex) in nyhaList"
                    :key="'nyha' + nyhaIndex"
                    :label="nyhaItem.nyhaCode"
                  >
                    {{ nyhaItem.nyhaName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row>
            <div class="inner_indent out_indent judge" style="display: flex">
              <div class="ARNI-content">ARNI：</div>
              <el-form-item label="单位剂量：" class="out_indent">
                <div style="display: flex">
                  <div style="margin-right: 10px; width: 162px">
                    <el-input v-model="outcomeForm.arniDose" />
                  </div>
                  <div>mg</div>
                </div>
              </el-form-item>
              <el-form-item label="服用频次：" label-width="100px" class="inner">
                <el-select v-model="outcomeForm.arniFerquency">
                  <el-option
                    v-for="(
                      arniFerquencyItem, arniFerquencyIndex
                    ) in arniFerquencyList"
                    :key="'arniFerquency' + arniFerquencyIndex"
                    :label="arniFerquencyItem.arniFerquencyName"
                    :value="arniFerquencyItem.arniFerquencyCode"
                  />
                </el-select>
              </el-form-item>
              <el-form-item label-width="0px" style="width: 162px">
                <el-select v-model="outcomeForm.arniFerquencyRange">
                  <el-option
                    v-for="(
                      arniFerquencyRangeItem, arniFerquencyRangeIndex
                    ) in arniFerquencyRangeList"
                    :key="'arniFerquencyRange' + arniFerquencyRangeIndex"
                    :label="arniFerquencyRangeItem.arniFerquencyRangeName"
                    :value="arniFerquencyRangeItem.arniFerquencyRangeCode"
                  />
                </el-select>
              </el-form-item>
            </div>
          </el-row>
          <el-row>
            <div class="inner_indent">
              <el-form-item label="住院期间并发症：" prop="complicationCheck" label-width="150px">
                <el-checkbox-group v-model="outcomeForm.complicationCheck">
                  <el-checkbox
                    v-for="(
                      complicationItem, complicationIndex
                    ) in complicationList"
                    :key="'complication' + complicationIndex"
                    :label="complicationItem.complicationCode"
                  >
                    {{ complicationItem.complicationName }}
                  </el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent"> 危险因素 </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="高血压：" prop="feritin" label-width="80px">
                <el-radio-group v-model="outcomeForm.feritin">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="out_indent judge">
              <el-form-item label="高脂血症：" prop="hyperlipemia">
                <el-radio-group v-model="outcomeForm.hyperlipemia">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="out_indent judge">
              <el-form-item label="糖尿病：" prop="diabetes" label-width="80px">
                <el-radio-group v-model="outcomeForm.diabetes">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="out_indent judge">
              <el-form-item label="吸烟：" prop="smoking" label-width="70px">
                <el-radio-group
                  v-model="outcomeForm.smoking"
                  @change="normalChange(outcomeForm.smoking, 'smokingStatus')"
                >
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="out_indent judge">
              <el-form-item label="吸烟情况：" label-width="85px">
                <el-radio-group v-model="outcomeForm.smokingStatus" :disabled="outcomeForm.smoking !== '1'">
                  <el-radio
                    v-for="(
                      smokingStatusItem, smokingStatusIndex
                    ) in smokingStatusList"
                    :key="'smokingStatus' + smokingStatusIndex"
                    :label="smokingStatusItem.smokingStatusCode"
                  >
                    {{ smokingStatusItem.smokingStatusName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="out_indent judge">
              <el-form-item label="肥胖：" prop="obesity" label-width="70px">
                <el-radio-group v-model="outcomeForm.obesity">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="早发CVD家族史(男<55岁，女<60岁)：" prop="familyDisease" label-width="278px">
                <el-radio-group v-model="outcomeForm.familyDisease">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row> 合并疾病 </el-row>
          <el-row class="inner_indent" type="flex">
            <div class="inner_indent out_indent judge">
              <el-form-item label="冠心病：" prop="chd" label-width="135px">
                <el-radio-group
                  v-model="outcomeForm.chd"
                  @change="
                    normalChange(outcomeForm.chd, 'previousRevascularization')
                  "
                >
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="judge">
              <el-form-item label="血运重建史：" prop="" label-width="135px">
                <el-radio-group v-model="outcomeForm.previousRevascularization" :disabled="outcomeForm.chd !== 1">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent" type="flex">
            <div class="inner_indent out_indent judge">
              <el-form-item label="心房颤动：" prop="af" label-width="135px">
                <el-radio-group v-model="outcomeForm.af" @change="normalChange(outcomeForm.af, 'afType')">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="分型：" label-width="135px">
                <el-radio-group v-model="outcomeForm.afType" :disabled="outcomeForm.af !== 1">
                  <el-radio
                    v-for="(typeItem, typeIndex) in typeList"
                    :key="'type' + typeIndex"
                    :label="typeItem.typeCode"
                  >
                    {{ typeItem.typeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent" type="flex">
            <div class="inner_indent out_indent judge">
              <el-form-item label="慢性心力衰竭：" prop="slowHeartFailure" label-width="135px">
                <el-radio-group
                  v-model="outcomeForm.slowHeartFailure"
                  @change="
                    normalChange(outcomeForm.slowHeartFailure, 'nyhaLevel')
                  "
                >
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="NYHA分级：" prop="nyhaLevel" label-width="135px">
                <el-radio-group v-model="outcomeForm.nyhaLevel" :disabled="outcomeForm.slowHeartFailure !== 1">
                  <el-radio
                    v-for="(nyhaItem, nyhaIndex) in nyhaList"
                    :key="'nyha' + nyhaIndex"
                    :label="nyhaItem.nyhaCode"
                  >
                    {{ nyhaItem.nyhaName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="心脏瓣膜病：" prop="avhd" label-width="135px">
                <el-radio-group v-model="outcomeForm.avhd">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent" type="flex">
            <div class="inner_indent out_indent judge">
              <el-form-item label="脑血管疾病：" prop="brianVascellum" label-width="135px">
                <el-radio-group
                  v-model="outcomeForm.brianVascellum"
                  @change="
                    normalChange(
                      outcomeForm.brianVascellum,
                      'brianVascellumDesc'
                    )
                  "
                >
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="脑血管疾病-描述：" label-width="135px">
                <el-radio-group v-model="outcomeForm.brianVascellumDesc" :disabled="outcomeForm.brianVascellum !== 1">
                  <el-radio
                    v-for="(cerebroItem, cerebroIndex) in cerebroList"
                    :key="'cerebro' + cerebroIndex"
                    :label="cerebroItem.cerebroCode"
                  >
                    {{ cerebroItem.cerebroName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="外周动脉疾病：" prop="peripheralArteryDisease" label-width="135px">
                <el-radio-group v-model="outcomeForm.peripheralArteryDisease">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="主动脉瘤：" prop="aorticAneurysm" label-width="135px">
                <el-radio-group v-model="outcomeForm.aorticAneurysm">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="COPD：" prop="copd" label-width="135px">
                <el-radio-group v-model="outcomeForm.copd">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="慢性肾病：" prop="chronicKidneyDisease" label-width="135px">
                <el-radio-group v-model="outcomeForm.chronicKidneyDisease">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="贫血：" prop="anemia" label-width="135px">
                <el-radio-group v-model="outcomeForm.anemia">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="消化性溃疡：" prop="pepticUlcer" label-width="135px">
                <el-radio-group v-model="outcomeForm.pepticUlcer">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="甲状腺功能异常：" prop="thyroidDisease" label-width="135px">
                <el-radio-group v-model="outcomeForm.thyroidDisease">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="恶性肿瘤：" prop="therioma" label-width="135px">
                <el-radio-group v-model="outcomeForm.therioma">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row> 检查结果 </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="72内肌钙蛋白：" prop="troponin72h" label-width="175px">
                <el-radio-group v-model="outcomeForm.troponin72h" @change="troponin72hChange">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="judge">
              <el-form-item label="72内肌钙蛋白最高值：" prop="troponin72hType" label-width="160px">
                <el-radio-group v-model="outcomeForm.troponin72hType" :disabled="outcomeForm.troponin72h !== '1'">
                  <el-radio
                    v-for="(troponinItem, troponinIndex) in troponinList"
                    :key="'troponin' + troponinIndex"
                    :label="troponinItem.troponinCode"
                  >
                    {{ troponinItem.troponinName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label-width="13px">
                <el-input v-model="outcomeForm.ctniMaxValue" :disabled="outcomeForm.troponin72h !== '1'" />
              </el-form-item>
            </div>
            <div class="inner_no_label">
              <el-form-item label-width="5px">
                <el-select v-model="outcomeForm.ctniMaxValueUnit" :disabled="outcomeForm.troponin72h !== '1'">
                  <el-option
                    v-for="(
                      troponinUnitItem, troponinUnitIndex
                    ) in troponinUnitList"
                    :key="'troponinUnit' + troponinUnitIndex"
                    :label="troponinUnitItem.troponinUnitName"
                    :value="troponinUnitItem.troponinUnitCode"
                  />
                </el-select>
              </el-form-item>
            </div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="脑钠肽" prop="bnp" label-width="175px">
                <el-radio-group v-model="outcomeForm.bnp" @change="bnpChange">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="out_indent">
              <el-form-item label="" label-width="0px">
                <el-radio-group v-model="outcomeForm.bnpType" :disabled="outcomeForm.bnp !== '1'">
                  <el-radio
                    v-for="(
                      brainNatriureticItem, brainNatriureticIndex
                    ) in brainNatriureticList"
                    :key="' brainNatriuretic' + brainNatriureticIndex"
                    :label="brainNatriureticItem.brainNatriureticCode"
                  >
                    {{ brainNatriureticItem.brainNatriureticName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="vertical-center">最高值</div>
            <div>
              <el-form-item label="" label-width="0px">
                <el-input v-model="outcomeForm.bnpValue" :disabled="outcomeForm.bnp !== '1'" />
              </el-form-item>
            </div>
            <div class="vertical-center">pg/mL</div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="总胆固醇(TC)" prop="tc" label-width="175px">
                <el-radio-group v-model="outcomeForm.tc" @change="normalChange(outcomeForm.tc, 'tcValue')">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="总胆固醇(TC)-数值：" label-width="278px">
                <el-input v-model="outcomeForm.tcValue" :disabled="outcomeForm.tc !== '1'" />
              </el-form-item>
            </div>
            <div class="vertical-center">mmol/L</div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="甘油三酯(TG)" prop="tg" label-width="175px">
                <el-radio-group v-model="outcomeForm.tg" @change="normalChange(outcomeForm.tg, 'tgValue')">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="甘油三酯(TG)-数值：" label-width="278px">
                <el-input v-model="outcomeForm.tgValue" :disabled="outcomeForm.tg !== '1'" />
              </el-form-item>
            </div>
            <div class="vertical-center">mmol/L</div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="高密度脂蛋白(HDL-C)：" prop="hdlC" label-width="175px">
                <el-radio-group v-model="outcomeForm.hdlC" @change="normalChange(outcomeForm.hdlC, 'hdlCValue')">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="高密度脂蛋白(HDL-C)-数值：" label-width="278px">
                <el-input v-model="outcomeForm.hdlCValue" :disabled="outcomeForm.hdlC !== '1'" />
              </el-form-item>
            </div>
            <div class="vertical-center">mmol/L</div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="低密度脂蛋白(LDL-C)：" prop="ldlC" label-width="175px">
                <el-radio-group v-model="outcomeForm.ldlC" @change="normalChange(outcomeForm.ldlC, 'ldlCValue')">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="低密度脂蛋白(LDL-C)-数值：" label-width="278px">
                <el-input v-model="outcomeForm.ldlCValue" :disabled="outcomeForm.ldlC !== '1'" />
              </el-form-item>
            </div>
            <div class="vertical-center">mmol/L</div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="脂蛋白(a)[Lp(a)]：" prop="lpa" label-width="175px">
                <el-radio-group v-model="outcomeForm.lpa" @change="lpaChange">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="judge">
              <el-form-item label="脂蛋白(a)[Lp(a)]数值：" prop="troponin72hType" label-width="160px">
                <el-input v-model="outcomeForm.lpa_value" :disabled="outcomeForm.lpa !== '1'" />
              </el-form-item>
            </div>
            <div class="inner_no_label">
              <el-form-item label-width="5px">
                <el-select v-model="outcomeForm.lpa_unit" :disabled="outcomeForm.lpa !== '1'">
                  <el-option
                    v-for="(
                      troponinUnitItem, troponinUnitIndex
                    ) in lpaUnitList"
                    :key="'troponinUnit' + troponinUnitIndex"
                    :label="troponinUnitItem.troponinUnitName"
                    :value="troponinUnitItem.troponinUnitCode"
                  />
                </el-select>
              </el-form-item>
            </div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="糖化血红蛋白：" prop="hba1c" label-width="175px">
                <el-radio-group v-model="outcomeForm.hba1c" @change="normalChange(outcomeForm.hba1c, 'hba1c_value')">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="糖化血红蛋白-数值：" label-width="278px">
                <el-input v-model="outcomeForm.hba1c_value" :disabled="outcomeForm.hba1c !== '1'" />
              </el-form-item>
            </div>
            <div class="vertical-center">%</div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="超声心电图：" prop="ucg" label-width="175px">
                <el-radio-group v-model="outcomeForm.ucg">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div>
              <el-form-item label="超声心动图(诊疗过程中最低值) LVEF" label-width="278px">
                <el-input v-model="outcomeForm.lvef" />
              </el-form-item>
            </div>
            <div class="vertical-center out_indent">%</div>
          </el-row>
          <el-row type="flex" class="inner_indent">
            <div class="inner_indent out_indent judge">
              <el-form-item label="超声心动图-室壁瘤：" prop="vntricularAneurysm" label-width="175px">
                <el-radio-group v-model="outcomeForm.vntricularAneurysm">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
            <div class="judge">
              <el-form-item label="超声心动图-局部室壁活动异常：" label-width="278px">
                <el-radio-group v-model="outcomeForm.partVntricular">
                  <el-radio
                    v-for="(judgeItem, judgeIndex) in judgeStrList"
                    :key="'judge' + judgeIndex"
                    :label="judgeItem.judgeCode"
                  >
                    {{ judgeItem.judgeName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row> 出院带药 </el-row>
          <el-row
            v-for="(outDataItem, outDataIndex) in outDrugData"
            :key="'outData' + outDataIndex"
            class="inner_indent"
          >
            <el-row
              v-for="(outDrugItem, outDrugIndex) in outDataItem.outDrugList"
              :key="'outDrug' + outDrugIndex"
              type="flex"
            >
              <div class="inner_indent out_indent judge">
                <el-form-item
                  :label="outDataItem.typeName"
                  label-width="170px"
                  :required="outcomeForm.outcomeCode == 1 && (outcomeForm.mainDiagnosisCode == '1' || outcomeForm.mainDiagnosisCode == '2' || outcomeForm.mainDiagnosisCode == '3')"
                >
                  <el-radio-group v-model="outDrugItem.determine">
                    <el-radio
                      v-for="(judgeItem, judgeIndex) in judgeList"
                      :key="'judge' + judgeIndex"
                      :label="judgeItem.judgeCode"
                    >
                      {{ judgeItem.judgeName }}
                    </el-radio>
                  </el-radio-group>
                </el-form-item>
              </div>
              <div class="inner_midum">
                <el-form-item
                  label="药物名称："
                  label-width="120px"
                  :required="outcomeForm.outcomeCode == '1' && (outcomeForm.mainDiagnosisCode == '1' || outcomeForm.mainDiagnosisCode == '2' || outcomeForm.mainDiagnosisCode == '3') && outDrugItem.determine == '1'"
                >
                  <el-select v-model="outDrugItem.name" :disabled="outDrugItem.determine !== 1">
                    <el-option
                      v-for="(drugItem, drugIndex) in drugList[outDataIndex]"
                      :key="'drug' + drugIndex"
                      :label="drugItem.drugName"
                      :value="drugItem.drugCode"
                    />
                  </el-select>
                </el-form-item>
              </div>
              <div class="inner_small">
                <el-form-item
                  label="服用频次："
                  label-width="120px"
                  :required="outcomeForm.outcomeCode == '1' && (outcomeForm.mainDiagnosisCode == '1' || outcomeForm.mainDiagnosisCode == '2' || outcomeForm.mainDiagnosisCode == '3') && outDrugItem.determine == '1'"
                >
                  <el-select v-model="outDrugItem.reteTime" :disabled="outDrugItem.determine !== 1">
                    <el-option
                      v-for="(frequencyItem, frequencyIndex) in frequencyList"
                      :key="'frequency' + frequencyIndex"
                      :label="frequencyItem.frequencyName"
                      :value="frequencyItem.frequencyCode"
                    />
                  </el-select>
                </el-form-item>
              </div>
              <div class="inner_samll_label">
                <el-form-item label="" label-width="0px">
                  <el-select v-model="outDrugItem.reteCount" :disabled="outDrugItem.determine !== 1">
                    <el-option
                      v-for="(timeUnitItem, timeUnitIndex) in timeUnitList"
                      :key="'timeUnit' + timeUnitIndex"
                      :label="timeUnitItem.timeUnitName"
                      :value="timeUnitItem.timeUnitCode"
                    />
                  </el-select>
                </el-form-item>
              </div>
              <div class="inner_small">
                <el-form-item
                  label="服用频次："
                  label-width="120px"
                  :required="outcomeForm.outcomeCode == '1' && (outcomeForm.mainDiagnosisCode == '1' || outcomeForm.mainDiagnosisCode == '2' || outcomeForm.mainDiagnosisCode == '3') && outDrugItem.determine == '1'"
                >
                  <el-input v-model="outDrugItem.dose" :disabled="outDrugItem.determine !== 1" />
                </el-form-item>
              </div>
              <div class="vertical-center">mg</div>
              <div class="vertical-center" style="padding-left: 30px">
                <el-button class="take-drug" @click="deleteDrug(outDataItem, outDrugIndex)">
                  删除
                </el-button>
                <el-button
                  v-if="outDataItem.outDrugList.length - 1 === outDrugIndex"
                  class="take-drug"
                  @click="addDrug(outDataItem)"
                >
                  新增
                </el-button>
              </div>
            </el-row>
          </el-row>
        </el-row>
        <!-- 出院 -->
        <el-row
          v-if="outcomeForm.mainDiagnosisCode === '6' &&
            outcomeForm.outcomeCode !== '5'
          "
          type="flex"
        >
          <div class="acs">非ACS心源性胸痛类型：</div>
          <div>
            <el-form-item label-width="0px">
              <el-checkbox-group v-model="outcomeForm.nacsTypeCheck">
                <el-checkbox v-for="(acsItem, acsIndex) in acsList" :key="'acs' + acsIndex" :label="acsItem.acsCode">
                  {{ acsItem.acsName }}
                </el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </div>
        </el-row>
        <!-- 离院 -->
        <el-row
          v-if="outcomeForm.firstDiagnosisCode === '6' &&
            outcomeForm.outcomeCode === '5'
          "
          type="flex"
        >
          <div class="acs">非ACS心源性胸痛类型：</div>
          <div>
            <el-form-item v-if="outcomeForm.firstDiagnosisCode === '6'" label-width="0px">
              <el-checkbox-group v-model="outcomeForm.nascTypeCheck">
                <el-checkbox v-for="(acsItem, acsIndex) in acsList" :key="'acs' + acsIndex" :label="acsItem.acsCode">
                  {{ acsItem.acsName }}
                </el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </div>
        </el-row>
        <!-- 离院 -->
        <el-row
          v-if="outcomeForm.firstDiagnosisCode === '7' &&
            outcomeForm.outcomeCode === '5'
          "
          type="flex"
        >
          <div class="acs-other">其他非心源性胸痛类型：</div>
          <div>
            <el-form-item label="" label-width="0px">
              <el-checkbox-group v-model="outcomeForm.otherTypeCheck">
                <el-checkbox
                  v-for="(otheracsItem, otheracsIndex) in otheracsList"
                  :key="'otheracs' + otheracsIndex"
                  :label="otheracsItem.otheracsCode"
                >
                  {{ otheracsItem.otheracsName }}
                </el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </div>
        </el-row>
        <!-- 出院 -->
        <el-row
          v-if="outcomeForm.mainDiagnosisCode === '9' &&
            outcomeForm.outcomeCode !== '5'
          "
          type="flex"
        >
          <div class="acs-other">其他非心源性胸痛类型：</div>
          <div>
            <el-form-item label="" label-width="0px">
              <el-checkbox-group v-model="outcomeForm.otherNacsTypeCheck">
                <el-checkbox
                  v-for="(otheracsItem, otheracsIndex) in otheracsList"
                  :key="'otheracs' + otheracsIndex"
                  :label="otheracsItem.otheracsCode"
                >
                  {{ otheracsItem.otheracsName }}
                </el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </div>
        </el-row>

        <el-row v-if="outcomeForm.outcomeCode && outcomeForm.outcomeCode !== '5'">
          <el-row>
            <el-form-item label="住院期间用药（降糖药物）：" label-width="220px" required>
              <el-checkbox-group v-model="outcomeForm.hypoglycemicCheck">
                <el-checkbox
                  v-for="(
                    hypoglycemicItem, hypoglycemicIndex
                  ) in hypoglycemicList"
                  :key="'hypoglycemic' + hypoglycemicIndex"
                  :label="hypoglycemicItem.hypoglycemicCode"
                >
                  {{ hypoglycemicItem.hypoglycemicName }}
                </el-checkbox>
              </el-checkbox-group>
              <!-- <el-radio-group v-model="outcomeForm.hypoglycemic">
                <el-radio
                  v-for="(
                    hypoglycemicItem, hypoglycemicIndex
                  ) in hypoglycemicList"
                  :key="'hypoglycemic' + hypoglycemicIndex"
                  :label="hypoglycemicItem.hypoglycemicCode"
                >
                  {{ hypoglycemicItem.hypoglycemicName }}
                </el-radio>
              </el-radio-group> -->
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item label="住院期间用药（口服抗凝药）：" label-width="220px" required>
              <el-radio-group v-model="outcomeForm.anticoagulation">
                <el-radio
                  v-for="(
                    anticoagulationItem, anticoagulationIndex
                  ) in anticoagulationList"
                  :key="'anticoagulation' + anticoagulationIndex"
                  :label="anticoagulationItem.anticoagulationCode"
                >
                  {{ anticoagulationItem.anticoagulationName }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
          </el-row>
          <el-row type="flex">
            <el-form-item label="PCSK9：" label-width="95px" required>
              <el-radio-group v-model="outcomeForm.PCSK9">
                <el-radio
                  v-for="(PCSK9Item, PCSK9Index) in PCSK9List"
                  :key="'PCSK9' + PCSK9Index"
                  :label="PCSK9Item.PCSK9Code"
                >
                  {{ PCSK9Item.PCSK9Name }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label-width="40px">
              <el-input v-model="outcomeForm.PCSK9dose" />
            </el-form-item>
            <el-form-item label="mg" style="margin-left: 20px" />
          </el-row>

          <el-row type="flex">
            <div style="width: 200px">
              <el-form-item label="住院天数：" label-width="95px">
                <el-input v-model="outcomeForm.hod" />
              </el-form-item>
            </div>
            <div class="vertical-center" style="margin-right: 80px">天</div>
            <div style="width: 200px">
              <el-form-item label="总费用：" label-width="80px">
                <el-input v-model="outcomeForm.totalCost" />
              </el-form-item>
            </div>
            <div class="vertical-center">元</div>
          </el-row>
          <el-row type="flex">
            <div class="out-education">离院宣教：</div>
            <div>
              <el-form-item label="" label-width="0px">
                <el-checkbox-group v-model="outcomeForm.dischargePropagandaCheck">
                  <el-checkbox
                    v-for="(
                      outEducationItem, outEducationIndex
                    ) in outEducationList"
                    :key="'outEducation' + outEducationIndex"
                    :label="outEducationItem.outEducationCode"
                  >
                    {{ outEducationItem.outEducationName }}
                  </el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </div>
          </el-row>
          <el-row v-if="outcomeForm.outcomeCode === '4'" type="flex">
            <el-form-item label="死亡时间：" label-width="110px" class="date out_indent">
              <el-date-picker v-model="outcomeForm.deathTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" />
            </el-form-item>
            <el-form-item label="死亡原因：" label-width="90px">
              <el-radio-group v-model="outcomeForm.deathCauseCode">
                <el-radio
                  v-for="(deathCauseItem, deathCauseIndex) in deathCauseList"
                  :key="'deathCause' + deathCauseIndex"
                  :label="deathCauseItem.deathCauseCode"
                >
                  {{ deathCauseItem.deathCauseName }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
          </el-row>

          <el-row v-if="outcomeForm.outcomeCode === '3'">
            <el-form-item label="转科时间：" label-width="110px" class="date">
              <el-date-picker v-model="outcomeForm.transferDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" />
            </el-form-item>
            <el-form-item label="接诊科室：" label-width="110px">
              <el-radio-group v-model="outcomeForm.admissionDept">
                <el-radio
                  v-for="(
                    admissionDeptItem, admissionDeptIndex
                  ) in admissionDeptList"
                  :key="'admissionDept' + admissionDeptIndex"
                  :label="admissionDeptItem.name"
                  style="line-height: 25px"
                >
                  {{ admissionDeptItem.name }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="转科原因描述：" label-width="110px">
              <el-input v-model="outcomeForm.transferReason" type="textarea" :rows="2" />
            </el-form-item>
          </el-row>
          <el-row v-if="outcomeForm.outcomeCode === '2'" type="flex">
            <el-form-item label="医院名称：" label-width="110px" class="out_indent">
              <el-input v-model="outcomeForm.handHospitalName" />
            </el-form-item>
            <el-form-item label="转运PCI：" label-width="80px" class="out_indent">
              <el-radio-group v-model="outcomeForm.isTransPci">
                <el-radio
                  v-for="(judgeItem, judgeIndex) in judgeStrList"
                  :key="'judge' + judgeIndex"
                  :label="judgeItem.judgeCode"
                >
                  {{ judgeItem.judgeName }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
          </el-row>
          <el-row v-if="outcomeForm.outcomeCode === '2'" type="flex">
            <el-form-item label="直达导管室转院：" label-width="140px" style="margin-right: 95px">
              <el-radio-group v-model="outcomeForm.isDirectCatheter">
                <el-radio
                  v-for="(judgeItem, judgeIndex) in judgeStrList"
                  :key="'judge' + judgeIndex"
                  :label="judgeItem.judgeCode"
                >
                  {{ judgeItem.judgeName }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="实际介入手术开始时间：" label-width="180px" class="date">
              <el-date-picker v-model="outcomeForm.decisionOpTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" />
            </el-form-item>
          </el-row>

          <el-row v-if="outcomeForm.outcomeCode === '1'" type="flex">
            <div class="inner">
              <el-form-item label="出院时间：" label-width="95px" class="date">
                <el-date-picker v-model="outcomeForm.leaveTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" />
                <!-- <el-input v-model="outcomeForm.leaveTime" /> -->
              </el-form-item>
            </div>
            <div>
              <el-form-item label="治疗结果：" prop="treatmentResultCode" label-width="95px">
                <el-radio-group v-model="outcomeForm.treatmentResultCode">
                  <el-radio
                    v-for="(
                      treatmentResultItem, treatmentResultIndex
                    ) in treatmentResultList"
                    :key="'treatmentResult' + treatmentResultIndex"
                    :label="treatmentResultItem.treatmentResultCode"
                  >
                    {{ treatmentResultItem.treatmentResultName }}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </div>
          </el-row>
        </el-row>
        <el-row v-if="outcomeForm.outcomeCode == '5'" type="flex">
          <div class="judge out_indent">
            <el-form-item label="患者自愿放弃后续治疗：" label-width="177px">
              <el-radio-group v-model="outcomeForm.isGiveUp">
                <el-radio
                  v-for="(judgeItem, judgeIndex) in judgeStrList"
                  :key="'judge' + judgeIndex"
                  :label="judgeItem.judgeCode"
                >
                  {{ judgeItem.judgeName }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
          </div>
          <div>
            <el-form-item label="医生：">
              <el-input v-model="outcomeForm.firstDiagnosisUserName" />
            </el-form-item>
          </div>
        </el-row>
        <el-row v-if="outcomeForm.outcomeCode == '5'">
          <div>
            <el-form-item label="处理措施：" label-width="110px">
              <el-radio-group v-model="outcomeForm.processStrategy">
                <el-radio
                  v-for="(
                    processStrategyItem, processStrategyIndex
                  ) in processStrategyList"
                  :key="'processStrategy' + processStrategyIndex"
                  :label="processStrategyItem.processStrategyCode"
                >
                  {{ processStrategyItem.processStrategyName }}
                </el-radio>
              </el-radio-group>
            </el-form-item>
          </div>
        </el-row>
        <el-row v-if="outcomeForm.outcomeCode">
          <el-form-item label="患者情况说明：" label-width="110px">
            <el-input v-model="outcomeForm.remark" type="textarea" :rows="2" />
          </el-form-item>
        </el-row>
      </el-form>
    </el-row>
  </div>
</template>

<script>
import {
  getOutsData,
  saveOutsData,
  getDepartmentList
} from '@/api/green-channel/outcome'
export default {
  props: {
    checkrowdata: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  data() {
    return {
      outcomeForm: {
        complicationCheck: [],
        nacsTypeCheck: [],
        nascTypeCheck: [],
        otherNacsTypeCheck: [],
        hypoglycemicCheck: [],
        otherTypeCheck: [],
        dischargePropagandaCheck: []
      },
      publicField: [
        'mainDiagnosisCode', // 出院诊断
        'diagnosisTime', // 确诊时间
        'covid19', // COVID-19：
        'hypoglycemicCheck', // 住院期间用药（降糖药物）
        'nacsTypeCheck', // 非ACS心源性胸痛类型（出院）
        'nascTypeCheck', // 非ACS心源性胸痛类型（离院）
        'anticoagulation', // 住院期间用药（口服抗凝药）
        'PCSK9', // PCSK9
        'PCSK9dose', // PCSK9(mg)
        'hod', // 住院天数
        'totalCost', // 总费用
        'dischargePropagandaCheck', // 离院宣教
        'remark' // 患者情况说明
      ],
      leaveField: [
        'firstDiagnosisCode', // 出院诊断
        'firstDiagnosisTime', // 确诊时间
        'isGiveUp', // 患者自愿放弃后续治疗
        'firstDiagn   osisUserName', // 医生
        'processStrategy', // 处理措施
        'otherTypeCheck',
        'otherType',
        'remark' // 患者情况说明
      ], // 离院
      outField: [
        'leaveTime', // 出院时间
        'otherNacsTypeCheck',
        'otherNacsType',
        'treatmentResultCode' // 治疗结果
      ], // 出院
      passField: [
        'handHospitalName', // 医院名称
        'isTransPci', // 转运PCI
        'isDirectCatheter', // 直达导管室转院
        'decisionOpTime' // 实际介入手术开始时间
      ], // 转院
      forwardField: [
        'transferDate', // 转科时间
        'admissionDept', // 接诊科室
        'transferReason' // 转科原因描述
      ], // 转科室
      deadField: [
        'deathTime', // 死亡时间：
        'deathCauseCode' // 死亡原因
      ], // 死亡
      // 患者转归
      outcomeList: [
        { outcomeName: '离院', outcomeCode: '5' },
        { outcomeName: '出院', outcomeCode: '1' },
        { outcomeName: '转送其他医院', outcomeCode: '2' },
        { outcomeName: '转送其他科室', outcomeCode: '3' },
        { outcomeName: '死亡', outcomeCode: '4' }
      ],
      // 出院诊断-离院
      firstDiagnosisList: [
        // { firstDiagnosisName: '请选择出院诊断', firstDiagnosisCode: '0' },
        { firstDiagnosisName: 'STEMI', firstDiagnosisCode: '1' },
        { firstDiagnosisName: 'NSTEMI', firstDiagnosisCode: '2' },
        { firstDiagnosisName: 'UA', firstDiagnosisCode: '3' },
        { firstDiagnosisName: '主动脉夹层', firstDiagnosisCode: '4' },
        { firstDiagnosisName: '肺动脉栓塞', firstDiagnosisCode: '5' },
        { firstDiagnosisName: '非ACS心源性胸痛', firstDiagnosisCode: '6' },
        { firstDiagnosisName: '其他非心源性胸痛', firstDiagnosisCode: '7' },
        { firstDiagnosisName: '胸痛待查', firstDiagnosisCode: '9' },
        { firstDiagnosisName: '胸闷待查', firstDiagnosisCode: '10' }
      ],
      // 出院诊断-出院
      mainDiagnosisList: [
        // { mainDiagnosisName: '请选择出院诊断', mainDiagnosisCode: '0' },
        { mainDiagnosisName: 'STEMI', mainDiagnosisCode: '1' },
        { mainDiagnosisName: 'NSTEMI', mainDiagnosisCode: '2' },
        { mainDiagnosisName: 'UA', mainDiagnosisCode: '3' },
        { mainDiagnosisName: '主动脉夹层', mainDiagnosisCode: '4' },
        { mainDiagnosisName: '肺动脉栓塞', mainDiagnosisCode: '5' },
        { mainDiagnosisName: '非ACS心源性胸痛', mainDiagnosisCode: '6' },
        { mainDiagnosisName: '其他非心源性胸痛', mainDiagnosisCode: '9' }
      ],
      // COVID-19
      covidList: [
        { covidName: '请选择', covidCode: '' },
        { covidName: '经筛查后排除', covidCode: 1 },
        { covidName: '经筛查后确诊', covidCode: 2 },
        { covidName: '未经筛查', covidCode: 3 }
      ],
      // 是 否 字符串
      judgeStrList: [
        { judgeName: '是', judgeCode: '1' },
        { judgeName: '否', judgeCode: '0' }
      ],
      // 是 否 数字
      judgeList: [
        { judgeName: '是', judgeCode: 1 },
        { judgeName: '否', judgeCode: 0 }
      ],
      // 住院期间并发症
      complicationList: [
        { complicationName: '心衰', complicationCode: '01' },
        { complicationName: '休克 ', complicationCode: '02' },
        { complicationName: '机械性并发症', complicationCode: '03' },
        { complicationName: '感染', complicationCode: '04' },
        { complicationName: '再发心梗', complicationCode: '05' },
        { complicationName: '血栓', complicationCode: '06' },
        { complicationName: '卒中', complicationCode: '07' },
        { complicationName: 'TIA', complicationCode: '08' },
        { complicationName: '出血', complicationCode: '09' },
        { complicationName: '呼吸衰竭', complicationCode: '10' },
        { complicationName: '肾衰竭', complicationCode: '11' },
        { complicationName: '死亡', complicationCode: '12' },
        { complicationName: '无', complicationCode: '99' }
      ],
      // 吸烟状态
      smokingStatusList: [
        { smokingStatusName: '已戒烟', smokingStatusCode: '1' },
        { smokingStatusName: '当前仍吸烟', smokingStatusCode: '2' }
      ],
      // 分型
      typeList: [
        { typeName: '阵发性', typeCode: '1' },
        { typeName: '持续性', typeCode: '2' },
        { typeName: '长程持续性', typeCode: '3' },
        { typeName: '永久性', typeCode: '4' }
      ],
      // NYHA分级
      nyhaList: [
        { nyhaName: 'I', nyhaCode: '1' },
        { nyhaName: 'II', nyhaCode: '2' },
        { nyhaName: 'III', nyhaCode: '3' },
        { nyhaName: 'IV', nyhaCode: '4' }
      ],
      // ARNI服用频次
      arniFerquencyList: [
        { arniFerquencyName: '请选择', arniFerquencyCode: '' },
        { arniFerquencyName: '1 次', arniFerquencyCode: '1' },
        { arniFerquencyName: '2 次', arniFerquencyCode: '2' },
        { arniFerquencyName: '3 次', arniFerquencyCode: '3' },
        { arniFerquencyName: '4 次', arniFerquencyCode: '4' }
      ],
      arniFerquencyRangeList: [
        { arniFerquencyRangeName: '请选择', arniFerquencyRangeCode: '' },
        { arniFerquencyRangeName: '每日', arniFerquencyRangeCode: '1' },
        { arniFerquencyRangeName: '每周', arniFerquencyRangeCode: '2' },
        { arniFerquencyRangeName: '每月', arniFerquencyRangeCode: '3' }
      ],
      // 脑血管疾病-描述
      cerebroList: [
        { cerebroName: '缺血性', cerebroCode: '1' },
        { cerebroName: '出血性', cerebroCode: '2' }
      ],
      // 72内肌钙蛋白最高值
      troponinList: [
        { troponinName: 'TNT', troponinCode: '1' },
        { troponinName: 'TNI', troponinCode: '2' }
      ],
      troponinUnitList: [
        { troponinUnitName: '', troponinUnitCode: '' },
        { troponinUnitName: 'ng/mL', troponinUnitCode: '1' },
        { troponinUnitName: 'ug/L', troponinUnitCode: '2' },
        { troponinUnitName: 'ng/L', troponinUnitCode: '3' },
        { troponinUnitName: 'pg/mL', troponinUnitCode: '4' },
        { troponinUnitName: 'mg/L', troponinUnitCode: '5' }
      ],
      lpaUnitList: [
        { troponinUnitName: '请选择单位', troponinUnitCode: '' },
        { troponinUnitName: 'mg/L', troponinUnitCode: '1' },
        { troponinUnitName: 'mg/dL', troponinUnitCode: '2' },
        { troponinUnitName: 'g/L', troponinUnitCode: '3' },
        { troponinUnitName: 'nmol/L', troponinUnitCode: '4' }
      ],

      brainNatriureticList: [
        { brainNatriureticName: 'BNP', brainNatriureticCode: '1' },
        { brainNatriureticName: 'NT-proBNP', brainNatriureticCode: '2' }
      ],
      // 药品
      drugList: {
        0: [
          { drugName: '请选择', drugCode: '' },
          { drugName: '阿司匹林', drugCode: '1' },
          { drugName: '氯吡格雷', drugCode: '2' },
          { drugName: '替格瑞洛', drugCode: '3' },
          { drugName: '普拉格雷', drugCode: '4' },
          { drugName: '西洛他唑', drugCode: '5' }
        ],
        1: [
          { drugName: '请选择', drugCode: '' },
          { drugName: '贝那普利', drugCode: '1' },
          { drugName: '依那普利', drugCode: '2' },
          { drugName: '赖诺普利', drugCode: '3' },
          { drugName: '卡托普利', drugCode: '4' },
          { drugName: '福辛普利', drugCode: '5' },
          { drugName: '摩西普利', drugCode: '6' },
          { drugName: '培哚普利', drugCode: '7' },
          { drugName: '雷米普利', drugCode: '8' },
          { drugName: '缬沙坦', drugCode: '9' },
          { drugName: '氯沙坦', drugCode: '10' },
          { drugName: '厄贝沙坦', drugCode: '11' },
          { drugName: '坎地沙坦', drugCode: '12' },
          { drugName: '替米沙坦', drugCode: '13' },
          { drugName: '奥美沙坦', drugCode: '14' },
          { drugName: '沙库巴曲缬沙坦钠', drugCode: '15' },
          { drugName: '单片复方制剂', drugCode: '16' }
        ],
        2: [
          { drugName: '请选择', drugCode: '' },
          { drugName: '阿托伐他汀', drugCode: '1' },
          { drugName: '瑞舒伐他汀', drugCode: '2' },
          { drugName: '洛伐他汀', drugCode: '3' },
          { drugName: '普伐他汀', drugCode: '4' },
          { drugName: '辛伐他汀', drugCode: '5' },
          { drugName: '氟伐他汀', drugCode: '6' },
          { drugName: '匹伐他汀', drugCode: '7' },
          { drugName: '依洛尤单抗', drugCode: '8' },
          { drugName: '依折麦布', drugCode: '9' },
          { drugName: '阿利西尤单抗', drugCode: '10' }
        ],
        3: [
          { drugName: '请选择', drugCode: '' },
          { drugName: '洒石酸美托洛尔', drugCode: '1' },
          { drugName: '琥珀酸美托洛尔', drugCode: '2' },
          { drugName: '比索洛尔', drugCode: '3' },
          { drugName: '阿替洛尔', drugCode: '4' },
          { drugName: '普萘洛尔', drugCode: '5' },
          { drugName: '奈必洛尔', drugCode: '6' },
          { drugName: '卡维地洛', drugCode: '7' }
        ]
      },
      // 服用频次
      frequencyList: [
        { frequencyName: '请选择', frequencyCode: '' },
        { frequencyName: '1次', frequencyCode: '1' },
        { frequencyName: '2次', frequencyCode: '2' },
        { frequencyName: '3次', frequencyCode: '3' },
        { frequencyName: '4次', frequencyCode: '4' }
      ],
      // 时间单位
      timeUnitList: [
        { timeUnitName: '请选择', timeUnitCode: '' },
        { timeUnitName: '每日', timeUnitCode: '1' },
        { timeUnitName: '每周', timeUnitCode: '2' },
        { timeUnitName: '每月', timeUnitCode: '3' }
      ],
      // 离院宣教
      outEducationList: [
        { outEducationName: '戒烟', outEducationCode: '1' },
        { outEducationName: '规律坚持服药', outEducationCode: '2' },
        { outEducationName: '遵医嘱随访治疗', outEducationCode: '3' },
        { outEducationName: '生活起居调护', outEducationCode: '4' },
        {
          outEducationName:
            '心血管危险因素控制（降压、调脂、血糖控制、限酒、控制体重）',
          outEducationCode: '5'
        },
        { outEducationName: '未宣教', outEducationCode: '9' }
      ],
      // 治疗效果
      treatmentResultList: [
        { treatmentResultName: '治愈', treatmentResultCode: '1' },
        { treatmentResultName: '好转', treatmentResultCode: '2' },
        { treatmentResultName: '放弃治疗自动出院', treatmentResultCode: '3' },
        { treatmentResultName: '其它原因离院', treatmentResultCode: '9' }
      ],
      // 非ACS心源性胸痛类型
      acsList: [
        { acsName: '心律失常', acsCode: '01' },
        { acsName: '扩张性心肌病', acsCode: '02' },
        { acsName: '缺血性心肌病', acsCode: '03' },
        { acsName: '肥厚型心肌病', acsCode: '04' },
        { acsName: '心肌炎', acsCode: '05' },
        { acsName: '冠心病', acsCode: '06' },
        { acsName: '瓣膜性心脏病', acsCode: '07' },
        { acsName: '陈旧性心肌梗死', acsCode: '08' },
        { acsName: '心绞痛', acsCode: '09' },
        { acsName: '心悸', acsCode: '10' },
        { acsName: '房颤', acsCode: '11' },
        { acsName: '高血压', acsCode: '12' },
        { acsName: '心衰', acsCode: '13' },
        { acsName: '房扑', acsCode: '14' },
        { acsName: '室早', acsCode: '15' },
        { acsName: '房早', acsCode: '16' },
        { acsName: '室上速', acsCode: '17' },
        { acsName: '心包炎', acsCode: '18' },
        { acsName: '心肌桥', acsCode: '19' },
        { acsName: '心包积液', acsCode: '20' },
        { acsName: '主动脉管壁间血肿', acsCode: '21' },
        { acsName: '透壁性动脉粥样硬化性溃疡', acsCode: '22' },
        { acsName: '主动脉瘤', acsCode: '23' },
        { acsName: '张力性气胸', acsCode: '24' }
      ],
      // 其它非心源性胸痛类型
      otheracsList: [
        { otheracsName: '呼吸系统病', otheracsCode: '01' },
        { otheracsName: '消化系统病', otheracsCode: '02' },
        { otheracsName: '神经系统病', otheracsCode: '03' },
        { otheracsName: '精神系统病', otheracsCode: '04' },
        { otheracsName: '肌肉骨骼病', otheracsCode: '05' },
        { otheracsName: '皮肤系统病', otheracsCode: '06' },
        { otheracsName: '其他', otheracsCode: '09' }
      ],
      // 出院带药
      outDrugData: [
        {
          type: '1',
          typeName: '抗血小板药物',
          outDrugList: [{ determine: 0 }]
        },
        { type: '2', typeName: 'ACEI/ARB', outDrugList: [{ determine: 0 }] },
        { type: '3', typeName: '调脂药物', outDrugList: [{ determine: 0 }] },
        { type: '4', typeName: 'β受体阻滞剂', outDrugList: [{ determine: 0 }] }
      ],
      // 处理措施
      processStrategyList: [
        { processStrategyName: '收治入院', processStrategyCode: '1' },
        { processStrategyName: '急诊留观', processStrategyCode: '2' },
        { processStrategyName: '门诊治疗', processStrategyCode: '3' },
        { processStrategyName: '随访', processStrategyCode: '4' }
      ],
      // 住院期间用药（降糖药物）
      hypoglycemicList: [
        { hypoglycemicName: '磺脲类', hypoglycemicCode: '1' },
        { hypoglycemicName: '双胍类', hypoglycemicCode: '2' },
        { hypoglycemicName: 'α糖苷酶抑制剂', hypoglycemicCode: '3' },
        { hypoglycemicName: 'DPP-4抑制剂', hypoglycemicCode: '4' },
        { hypoglycemicName: 'GLP-1受体激动剂', hypoglycemicCode: '5' },
        { hypoglycemicName: 'SGLT-2抑制剂', hypoglycemicCode: '6' },
        { hypoglycemicName: '胰岛素及胰岛素类似物', hypoglycemicCode: '7' },
        { hypoglycemicName: '其他', hypoglycemicCode: '99' }
      ],
      // 住院期间用药（口服抗凝药）
      anticoagulationList: [
        { anticoagulationName: '华法林', anticoagulationCode: '1' },
        { anticoagulationName: '达比加群酯', anticoagulationCode: '2' },
        { anticoagulationName: '利伐沙班', anticoagulationCode: '3' },
        { anticoagulationName: '阿哌沙班', anticoagulationCode: '4' },
        { anticoagulationName: '其他', anticoagulationCode: '99' }
      ],
      // PCSK9
      PCSK9List: [
        { PCSK9Name: '阿利西尤单抗', PCSK9Code: '1' },
        { PCSK9Name: '依洛尤单抗', PCSK9Code: '2' }
      ],
      // 科室
      admissionDeptList: [],
      // 死亡原因
      deathCauseList: [
        { deathCauseName: '心源性', deathCauseCode: '1' },
        { deathCauseName: '非心源性', deathCauseCode: '2' }
      ],
      // 查询接口是否有数据
      hasData: false,
      outcomeRules: {
        isHeartFailure: [{ required: true, message: ' ', trigger: 'change' }],
        complicationCheck: [
          { required: true, message: ' ', trigger: 'change' }
        ],
        feritin: [{ required: true, message: ' ', trigger: 'change' }],
        hyperlipemia: [{ required: true, message: ' ', trigger: 'change' }],
        diabetes: [{ required: true, message: ' ', trigger: 'change' }],
        smoking: [{ required: true, message: ' ', trigger: 'change' }],
        obesity: [{ required: true, message: ' ', trigger: 'change' }],
        familyDisease: [{ required: true, message: ' ', trigger: 'change' }],
        chd: [{ required: true, message: ' ', trigger: 'change' }],
        af: [{ required: true, message: ' ', trigger: 'change' }],
        slowHeartFailure: [{ required: true, message: ' ', trigger: 'change' }],
        avhd: [{ required: true, message: ' ', trigger: 'change' }],
        brianVascellum: [{ required: true, message: ' ', trigger: 'change' }],
        peripheralArteryDisease: [
          { required: true, message: ' ', trigger: 'change' }
        ],
        aorticAneurysm: [{ required: true, message: ' ', trigger: 'change' }],
        copd: [{ required: true, message: ' ', trigger: 'change' }],
        chronicKidneyDisease: [
          { required: true, message: ' ', trigger: 'change' }
        ],
        anemia: [{ required: true, message: ' ', trigger: 'change' }],
        pepticUlcer: [{ required: true, message: ' ', trigger: 'change' }],
        thyroidDisease: [{ required: true, message: ' ', trigger: 'change' }],
        therioma: [{ required: true, message: ' ', trigger: 'change' }],
        troponin72h: [{ required: true, message: ' ', trigger: 'change' }],
        bnp: [{ required: true, message: ' ', trigger: 'change' }],
        tc: [{ required: true, message: ' ', trigger: 'change' }],
        tg: [{ required: true, message: ' ', trigger: 'change' }],
        hdlC: [{ required: true, message: ' ', trigger: 'change' }],
        ldlC: [{ required: true, message: ' ', trigger: 'change' }],

        lpa: [{ required: true, message: ' ', trigger: 'change' }],
        hba1c: [{ required: true, message: ' ', trigger: 'change' }],

        ucg: [{ required: true, message: ' ', trigger: 'change' }],
        vntricularAneurysm: [
          { required: true, message: ' ', trigger: 'change' }
        ],
        // hod: [{ required: true, message: ' ', trigger: 'change' }],
        // totalCost: [{ required: true, message: ' ', trigger: 'change' }],
        // leaveTime: [{ required: true, message: ' ', trigger: 'change' }],
        treatmentResultCode: [
          { required: true, message: ' ', trigger: 'change' }
        ]
      }
    }
  },
  created() {
    this.getOutsData()
    this.getDepartmentList()
  },
  methods: {
    // 查询胸痛转归数据信息
    getOutsData(val = '') {
      getOutsData(this.checkrowdata.dispatchId).then((res) => {
        if (res.data != null) {
          this.outcomeForm = res.data
          this.setDrug()
          this.setChecks('complication')
          this.setChecks('nacsType')
          this.setChecks('otherNacsType')
          this.setChecks('hypoglycemic')
          this.setChecks('otherType')
          this.setChecks('dischargePropaganda')
          this.setChecks('nascType')
          this.hasData = true
          // 患者出院方式对应字段初始化
          if (val && res.data.outcomeCode !== val) {
            this.outcomeForm.outcomeCode = val
            if (val === '1') {
              this.clearField(this.outField.concat(this.publicField))
            }
            if (val === '2') {
              this.clearField(this.passField.concat(this.publicField))
            }
            if (val === '3') {
              this.clearField(this.forwardField.concat(this.publicField))
            }
            if (val === '4') {
              this.clearField(this.deadField.concat(this.publicField))
            }
            if (val === '5') {
              this.clearField(this.leaveField)
            }
            this.$nextTick(() => {
              this.$refs.outcome.clearValidate()
            })
          }
        } else {
          if (!this.outcomeForm.outcomeCode) {
            this.hasData = false
          }
        }
      })
    },
    // 清空对应患者出院方式的字段信息
    clearField(list) {
      list.forEach((field) => {
        if (field.indexOf('Check') < 0) {
          this.$set(this.outcomeForm, field, '')
        } else {
          this.$set(this.outcomeForm, field, [])
        }
      })
    },
    // 多选框字段字符串转数组
    setChecks(field) {
      const str = this.outcomeForm[field]
      if (typeof str !== 'undefined' && str != null && str !== '') {
        this.$set(this.outcomeForm, field + 'Check', str.split('|'))
      } else {
        this.$set(this.outcomeForm, field + 'Check', [])
      }
    },
    // 多选框字段数组转字符串
    joinChecks(field) {
      this.outcomeForm[field] = this.outcomeForm[field + 'Check'].join('|')
    },
    // 查询对应科室
    getDepartmentList() {
      getDepartmentList({
        hospitalId: this.$store.getters.hospitalId,
        greenType: '胸痛'
      }).then((res) => {
        this.admissionDeptList = res.data
      })
    },
    // 初始化药品数据
    setDrug() {
      // eslint-disable-next-line prefer-const
      let outDrugArr = this.outcomeForm.outDrugList
      if (
        typeof outDrugArr !== 'undefined' &&
        outDrugArr != null &&
        outDrugArr !== ''
      ) {
        this.outDrugData.forEach((el, index) => {
          el.outDrugList = [{ determine: 0 }]
          outDrugArr.forEach((item) => {
            if (item.type === el.type) {
              el.outDrugList.push({ ...item, determine: 1 })
            }
          })
          if (el.outDrugList.length > 1) {
            el.outDrugList = el.outDrugList.filter(
              (item) => item.determine !== 0
            )
          }
        })
      }
    },
    // 添加药品
    addDrug(data) {
      this.outDrugData.forEach((el) => {
        if (el.type === data.type) {
          el.outDrugList.push({ determine: 0 })
        }
      })
    },
    // 删除药品
    deleteDrug(data, itemIndex) {
      this.outDrugData.forEach((el) => {
        if (el.outDrugList.length > 1) {
          if (el.type === data.type) {
            el.outDrugList.splice(itemIndex, 1)
          }
        }
      })
    },
    requiredCheck() {
      if (this.outcomeForm.outcomeCode == '1' || this.outcomeForm.outcomeCode == '2' || this.outcomeForm.outcomeCode == '4') {
        let tips = false
        if (this.outcomeForm.hypoglycemicCheck == '' || !this.outcomeForm.hypoglycemicCheck || this.outcomeForm.hypoglycemicCheck.length == 0) {
          tips = '住院期间用药（降糖药物）'
        }
        if (this.outcomeForm.anticoagulation == '' || !this.outcomeForm.anticoagulation || this.outcomeForm.anticoagulation.length == 0) {
          tips = '住院期间用药（口服抗凝药）'
        }
        if (this.outcomeForm.PCSK9 == '' || !this.outcomeForm.PCSK9 || this.outcomeForm.PCSK9.length == 0) {
          tips = 'PCSK9'
        }
        if (tips) {
          this.$message.warning(tips + '不能为空')
        }
      }
      return true
    },
    // 保存前数据处理
    save() {
      // this.$refs.outcome.validate((valid) => {
      // if (!valid) {
      //   this.$message.error('请通过验证')
      // } else {
      this.outcomeForm.dispatchId = this.checkrowdata.dispatchId
      this.outcomeForm.outcomeName = this.getName('outcome')
      this.outcomeForm.treatmentResultName = this.getName('treatmentResult')
      this.outcomeForm.firstDiagnosisName = this.getName('firstDiagnosis')
      this.outcomeForm.deathCauseName = this.getName('deathCause')
      this.outcomeForm.mainDiagnosisName = this.getName('mainDiagnosis')

      this.joinChecks('complication')
      this.joinChecks('nacsType')
      this.joinChecks('otherNacsType')
      this.joinChecks('hypoglycemic')
      this.joinChecks('otherType')
      this.joinChecks('dischargePropaganda')

      // eslint-disable-next-line prefer-const
      let outDrugArr = []
      this.outDrugData.forEach((item) => {
        item.outDrugList.forEach((el) => {
          if (el.determine !== 0) {
            outDrugArr.push({ ...el, type: item.type })
          }
        })
      })
      this.outcomeForm.outDrugList = outDrugArr
      this.saveOutsData(this.outcomeForm)
      // }
      // })
    },
    // 调用保存接口
    saveOutsData(data) {
      saveOutsData(data).then((res) => {
        this.$message.success('保存成功')
        this.getOutsData()
      })
    },
    // 查询单选的key值对应的名称
    getName(field) {
      let str = ''
      this[field + 'List'].forEach((item) => {
        if (item[field + 'Code'] === this.outcomeForm[field + 'Code']) {
          str = item[field + 'Name']
        }
      })
      return str
    },
    // 查询特殊单选的key值对应的名称
    getNameOther(field, fieldOther) {
      let str = ''
      this[field + 'List'].forEach((item) => {
        if (item[field + 'Code'] === this.outcomeForm[fieldOther + 'Code']) {
          str = item[field + 'Name']
        }
      })
      return str
    },
    // 个别单选数值改变时相应字段赋空
    normalChange(val, field) {
      // eslint-disable-next-line eqeqeq
      if (val != 1) {
        this.outcomeForm[field] = ''
      }
    },
    // 72内肌钙蛋白数值改变时，相应字段赋空值
    troponin72hChange(val) {
      if (val !== '1') {
        this.outcomeForm.troponin72hType = ''
        this.outcomeForm.ctniMaxValue = ''
        this.outcomeForm.ctniMaxValueUnit = ''
      }
    },
    // 脂蛋白(a)[Lp(a)]数值改变时，相应字段赋空值
    lpaChange(val) {
      if (val !== '1') {
        this.outcomeForm.lpa_value = ''
        this.outcomeForm.lpa_unit = ''
      }
    },
    // 脑钠肽值改变时，相应字段赋空值
    bnpChange(val) {
      if (val !== '1') {
        this.outcomeForm.bnpType = ''
        this.outcomeForm.bnpValue = ''
      }
    },

    add() {
      this.hasData = true
    }
  }
}
</script>

<style lang="scss" scoped>
.body {
  padding-left: 20px;
  padding-right: 20px;
  font-size: 14px;
  color: #606266;

  .no-data {
    padding: 20px 40px;
    color: #000;
    font-size: 1.17em;
  }

  .title {
    font-size: 20px;
    color: #1890ff;
  }

  .box-outCome {
    padding-left: 35px;
  }
}
</style>
<style lang="scss">
.box-outCome {
  .el-form-item.is-error .el-input__inner {
    border-color: #dcdfe6;
  }

  // .el-form-item.is-error .el-radio__inner {
  //   border-color: #ff4949;
  // }
  .el-form-item {
    margin-top: 4px;
    margin-bottom: 4px;

    &__label {
      font-weight: normal;
    }

    &--medium {
      .el-form-item {
        &__label {
          line-height: 25px;
        }

        &__content {
          line-height: 25px;
        }
      }
    }
  }

  .date {
    .el-date-editor.el-input {
      width: 200px;
      margin-right: 40px;
    }

    .el-input--medium {
      .el-input__inner {
        padding-left: 30px;
      }
    }
  }

  .el-input--medium {
    .el-input__inner {
      height: 25px;
      line-height: 25px;
      padding-left: 10px;
    }

    .el-input__icon {
      line-height: 25px;
    }
  }

  .vertical-center {
    display: flex;
    align-items: center;
    padding-left: 15px;
    padding-right: 15px;
  }

  .inner {
    width: 262px;
    margin-right: 40px;
  }

  .inner_midum {
    width: 250px;
    margin-right: 40px;
  }

  .inner_small {
    margin-right: 5px;
    width: 180px;
  }

  .inner_no_label {
    width: 160px;
    margin-right: 5px;
  }

  .inner_samll_label {
    width: 100px;
    margin-right: 40px;
  }

  .inner_indent {
    padding-left: 15px;
  }

  .ARNI-content {
    line-height: 25px;
    margin-top: 4px;
    margin-bottom: 4px;
    width: 90px;
  }

  .out_indent {
    margin-right: 40px;
  }

  .judge {
    .el-radio {
      margin-right: 10px;
    }
  }

  .el-radio {
    line-height: 25px !important;
  }

  .el-radio__label {
    padding-left: 0px;
  }

  .take-drug {
    padding: 4.5px 26px;
    margin-left: 10px;
  }

  .acs {
    width: 250px;
    padding-top: 8px;
  }

  .acs-other {
    width: 167px;
    padding-top: 8px;
  }

  .out-education {
    width: 90px;
    padding-top: 8px;
  }
}

.required-field:before {
  content: "*";
  color: red;
  margin-right: 2px;
}
</style>
